package com.zlx.mall.basic.common.enums;

/**
 * @Author xiatian
 * @Date 2024/6/11 星期二 14:22
 * @注释
 */
public enum AppOsTypeEnum {
    IOS("ios", "苹果", 1),
    ANDROID("android", "安卓", 2),
    H5("h5", "h5", 3);


    private String code;
    private String desc;
    private Integer appType;

    private AppOsTypeEnum(String code, String desc, Integer appType) {
        this.code = code;
        this.desc = desc;
        this.appType = appType;
    }

    public static AppOsTypeEnum getByCode(String code) {
        AppOsTypeEnum[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            AppOsTypeEnum clientTypeEnum = var1[var3];
            if (clientTypeEnum.getCode().equalsIgnoreCase(code)) {
                return clientTypeEnum;
            }
        }

        return null;
    }

    public boolean equals(String code) {
        return this.getCode().equalsIgnoreCase(code);
    }

    public String getCode() {
        return this.code;
    }

    public String getDesc() {
        return this.desc;
    }

    public Integer getAppType() {
        return this.appType;
    }
}
